package cmd

import (
	"daemon/mainwork"
	"fmt"
)

type DemoServe struct {
}

func (d *DemoServe) Name() string {
	return "demo_daemon"
}
func (d *DemoServe) Start() {
	fmt.Println("start")
	fmt.Println("running...")
	//开始主程序
	mainwork.Work()

}
func (d *DemoServe) Stop() error {
	fmt.Println("stop")
	return nil
}
func (d *DemoServe) Restart() error {
	fmt.Println("restart")
	return nil
}
